Conversation
Greptile SummaryThis PR fixes an incorrect
Confidence Score: 5/5
Sequence DiagramsequenceDiagram
participant Caller
participant Webhook
participant Resource_Webhook as Resource\Webhook
Caller->>Webhook: constructEvent(sigHeader, payload, secret, tolerance)
Webhook->>Webhook: verifyHeader(sigHeader, payload, secret, tolerance)
Note over Webhook: Returns string: 'pass' or error message
alt result == 'pass'
Webhook->>Resource_Webhook: constructFromPayload(payload)
Resource_Webhook-->>Webhook: Resource\Webhook object
Webhook-->>Caller: Resource\Webhook
else result is error string
Webhook-->>Caller: string (error message)
end
Last reviewed commit: 3403dff |
| * @return bool true | ||
| * @return string 'pass' if valid, otherwise an error message | ||
| */ | ||
| public function verifyHeader($sigHeader, $payload, $secret, $tolerance) |
There was a problem hiding this comment.
The docblock now correctly documents the return type as string, but the method signature itself has no enforced PHP return type. Adding : string would make the contract machine-checkable and consistent with the corrected docblock.
| public function verifyHeader($sigHeader, $payload, $secret, $tolerance) | |
| public function verifyHeader($sigHeader, $payload, $secret, $tolerance): string |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Description
This return types is not right.
Documentation
Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.
If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.